<template>
<div>

<nav class="list">
<nuxt-link :to="{path:'/page1'}">箭头函数</nuxt-link>
<nuxt-link :to="{path:'/page2'}">作用域</nuxt-link>
<nuxt-link :to="{path:'/page3'}">this</nuxt-link>
<nuxt-link :to="{path:'/page4'}">Promise</nuxt-link>
<p>{{$store.state.Topic.content}}</p>
<textarea v-model="content" style="height:200px;width:400px"></textarea>
<br/>
<button type="button" name="button" @click="change">提交</button>
<br/>

</nav>
</div>
</template>

<script>
export default{
data(){
return {content:""}
},
methods:{
change(){
const value=this.content;
this.$store.commit("Topic/change",value);
this.content="";
}
}
}
</script>

<style scope>
.list{
min-height:50px;
margin-top:20px;
}

.list>a{
padding:10px;
marign:5px;
border:1px solid #eee;
}
</style>
